﻿@inherits Vowei.Web.G18nWebViewPage<Vowei.Core.Models.Milestone>
@using System.Web.Mvc.Html 
@using Vowei.Core.Models;
@using Vowei.Web.Helpers;

@{
    ViewBag.Title = Model.Title;    
}

<fieldset>
    <legend>@string.Format(T("{0} 详细信息"), Model.Title)</legend>
        
    <div class="display-label">@T(m => m.StartDate)</div>
    <div class="display-field">@T(Model.StartDate)</div>
    
    <div class="display-label">@T(m => m.DueDate)</div>
    <div class="display-field">@T(Model.DueDate)</div>
    
    <div class="display-label">@T(m => m.Status)</div>
    <div class="display-field">@Model.Status</div>
    
    <div class="display-label">@T(m => m.Progress)</div>
    <div class="display-field">@T(Model.Progress)</div>
    
    <div class="display-label">@T(m => m.OpenDate)</div>
    <div class="display-field">@T(Model.OpenDate)</div>
    
    <div class="display-label">@T(m => m.ClosedDate)</div>
    <div class="display-field">@T(Model.ClosedDate)</div>
    
    <div class="display-label">@T(m => m.Reporter)</div>
    <div class="display-field">@Model.Reporter</div>
    
    @if (Model.BelongsToMilestone is Project) {
    <div class="display-label">
       @T(m => m.BelongsToMilestone)
    </div>
    <div class="display-field">
       <a href="/Project/Details/@Model.BelongsToMilestone.ID">@Model.BelongsToMilestone.Title</a>
    </div>
    }
    else if ( Model.BelongsToMilestone != null )
    {
    <div class="display-label">
       @T(m => m.BelongsToMilestone)
    </div>
    <div class="display-field">
       <a href="/Milestone/Details/@Model.BelongsToMilestone.ID">@Model.BelongsToMilestone.Title</a>
    </div>
    }    
</fieldset>

@Html.Partial("_MilestonePartial", Model)

<p>
    @Html.ActionLink(T("编辑"), "Edit", new { id = Model.ID }) |
    <a href="/Requirement/Index/?pid=@Model.ID">@T("需求列表")</a> |
    @Html.ActionLink(T("关闭里程碑"), "Close", new { id = Model.ID }) |
    @Html.ActionLink(T("创建需求"), "CreateIn", "Requirement", new { project = Model.ID }, null) |
    @Html.ActionLink(T("创建任务"), "CreateIn", "Task", new { project = Model.ID }, null)
</p>

@Html.Partial("_CommentPartial", Model)